{"ast":null,"code":"import LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport CSSMotion from 'rc-motion';\nimport React from 'react';\nvar getCollapsedWidth = function getCollapsedWidth() {\n  return {\n    width: 0,\n    opacity: 0,\n    transform: 'scale(0)'\n  };\n};\nvar getRealWidth = function getRealWidth(node) {\n  return {\n    width: node.scrollWidth,\n    opacity: 1,\n    transform: 'scale(1)'\n  };\n};\nvar LoadingIcon = function LoadingIcon(_ref) {\n  var prefixCls = _ref.prefixCls,\n    loading = _ref.loading,\n    existIcon = _ref.existIcon;\n  var visible = !!loading;\n  if (existIcon) {\n    return /*#__PURE__*/React.createElement(\"span\", {\n      className: \"\".concat(prefixCls, \"-loading-icon\")\n    }, /*#__PURE__*/React.createElement(LoadingOutlined, null));\n  }\n  return /*#__PURE__*/React.createElement(CSSMotion, {\n    visible: visible,\n    // We do not really use this motionName\n    motionName: \"\".concat(prefixCls, \"-loading-icon-motion\"),\n    removeOnLeave: true,\n    onAppearStart: getCollapsedWidth,\n    onAppearActive: getRealWidth,\n    onEnterStart: getCollapsedWidth,\n    onEnterActive: getRealWidth,\n    onLeaveStart: getRealWidth,\n    onLeaveActive: getCollapsedWidth\n  }, function (_ref2, ref) {\n    var className = _ref2.className,\n      style = _ref2.style;\n    return /*#__PURE__*/React.createElement(\"span\", {\n      className: \"\".concat(prefixCls, \"-loading-icon\"),\n      style: style,\n      ref: ref\n    }, /*#__PURE__*/React.createElement(LoadingOutlined, {\n      className: className\n    }));\n  });\n};\nexport default LoadingIcon;","map":{"version":3,"names":["LoadingOutlined","CSSMotion","React","getCollapsedWidth","width","opacity","transform","getRealWidth","node","scrollWidth","LoadingIcon","_ref","prefixCls","loading","existIcon","visible","createElement","className","motionName","removeOnLeave","onAppearStart","onAppearActive","onEnterStart","onEnterActive","onLeaveStart","onLeaveActive","_ref2","ref","style"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/button/LoadingIcon.js"],"sourcesContent":["import LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport CSSMotion from 'rc-motion';\nimport React from 'react';\nconst getCollapsedWidth = () => ({\n  width: 0,\n  opacity: 0,\n  transform: 'scale(0)'\n});\nconst getRealWidth = node => ({\n  width: node.scrollWidth,\n  opacity: 1,\n  transform: 'scale(1)'\n});\nconst LoadingIcon = _ref => {\n  let {\n    prefixCls,\n    loading,\n    existIcon\n  } = _ref;\n  const visible = !!loading;\n  if (existIcon) {\n    return /*#__PURE__*/React.createElement(\"span\", {\n      className: `${prefixCls}-loading-icon`\n    }, /*#__PURE__*/React.createElement(LoadingOutlined, null));\n  }\n  return /*#__PURE__*/React.createElement(CSSMotion, {\n    visible: visible,\n    // We do not really use this motionName\n    motionName: `${prefixCls}-loading-icon-motion`,\n    removeOnLeave: true,\n    onAppearStart: getCollapsedWidth,\n    onAppearActive: getRealWidth,\n    onEnterStart: getCollapsedWidth,\n    onEnterActive: getRealWidth,\n    onLeaveStart: getRealWidth,\n    onLeaveActive: getCollapsedWidth\n  }, (_ref2, ref) => {\n    let {\n      className,\n      style\n    } = _ref2;\n    return /*#__PURE__*/React.createElement(\"span\", {\n      className: `${prefixCls}-loading-icon`,\n      style: style,\n      ref: ref\n    }, /*#__PURE__*/React.createElement(LoadingOutlined, {\n      className: className\n    }));\n  });\n};\nexport default LoadingIcon;"],"mappings":"AAAA,OAAOA,eAAe,MAAM,4CAA4C;AACxE,OAAOC,SAAS,MAAM,WAAW;AACjC,OAAOC,KAAK,MAAM,OAAO;AACzB,IAAMC,iBAAiB,GAAG,SAApBA,iBAAiB;EAAA,OAAU;IAC/BC,KAAK,EAAE,CAAC;IACRC,OAAO,EAAE,CAAC;IACVC,SAAS,EAAE;EACb,CAAC;AAAA,CAAC;AACF,IAAMC,YAAY,GAAG,SAAfA,YAAY,CAAGC,IAAI;EAAA,OAAK;IAC5BJ,KAAK,EAAEI,IAAI,CAACC,WAAW;IACvBJ,OAAO,EAAE,CAAC;IACVC,SAAS,EAAE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